<!--<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head >
    <title>欢迎页</title>
    <link th:replace="admin/include/head :: head">
</head>
<body>
&lt;!&ndash;<body onload="showDate()">&ndash;&gt;
&lt;!&ndash;<div class="row  ">&ndash;&gt;
&lt;!&ndash;<div  class="well-sm pull-left  col-md-3">欢迎您：[[${session.loginUser.loginName}]]</div>&ndash;&gt;
&lt;!&ndash;<div  class="well-sm  col-md-3">&ndash;&gt;
&lt;!&ndash;现在时间：<span id="date"></span> <span id="time"></span>&ndash;&gt;
&lt;!&ndash;</div>&ndash;&gt;
&lt;!&ndash;<div  class="well-sm pull-right col-xs-3 ">&ndash;&gt;
&lt;!&ndash;<iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=2&num=2" width="330" height="70"&ndash;&gt;
&lt;!&ndash;frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>&ndash;&gt;
&lt;!&ndash;</div>&ndash;&gt;
&lt;!&ndash;</div>&ndash;&gt;
<section class="content">
    &lt;!&ndash;<div class="row">&ndash;&gt;
        &lt;!&ndash;<div class="col-md-3 col-sm-6 col-xs-12" id="list-todoTask" onclick="jumpCmsContent('cf71ca89cd50472c80b3aefe180bef98','待办任务','/workFlow/procToDoList');">&ndash;&gt;
            &lt;!&ndash;<div class="info-box">&ndash;&gt;
                &lt;!&ndash;<span class="info-box-icon" style="background-color: #e7f1f7"><i class="fa fa-tasks" style="color: #3c8dbc"></i></span>&ndash;&gt;

                &lt;!&ndash;<div class="info-box-content">&ndash;&gt;
                    &lt;!&ndash;<span class="info-box-text">待办事项</span>&ndash;&gt;
                    &lt;!&ndash;<span class="info-box-number" id="todo-taskCount" >23</span>&ndash;&gt;
                &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;&lt;!&ndash; /.info-box-content &ndash;&gt;&ndash;&gt;
            &lt;!&ndash;</div>&ndash;&gt;
            &lt;!&ndash;&lt;!&ndash; /.info-box &ndash;&gt;&ndash;&gt;
        &lt;!&ndash;</div>&ndash;&gt;
        &lt;!&ndash;&lt;!&ndash; /.col &ndash;&gt;&ndash;&gt;
        &lt;!&ndash;<div class="col-md-3 col-sm-6 col-xs-12" id="list-todoBumf" onclick="jumpCmsContent('ce848f862cff432082d5e4e8a78c8510','待办公文','/bumf2Base/page/bumfToDoList');">&ndash;&gt;
            &lt;!&ndash;<div class="info-box" >&ndash;&gt;
                &lt;!&ndash;<span class="info-box-icon" style="background-color: #e7f1f7"><i class="fa fa-paperclip" style="color: #3c8dbc"></i></span>&ndash;&gt;

                &lt;!&ndash;<div class="info-box-content">&ndash;&gt;
                    &lt;!&ndash;<span class="info-box-text">待审批公文</span>&ndash;&gt;
                    &lt;!&ndash;<span class="info-box-number" id="todo-bumfCount" >46</span>&ndash;&gt;
                &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;&lt;!&ndash; /.info-box-content &ndash;&gt;&ndash;&gt;
            &lt;!&ndash;</div>&ndash;&gt;
            &lt;!&ndash;&lt;!&ndash; /.info-box &ndash;&gt;&ndash;&gt;
        &lt;!&ndash;</div>&ndash;&gt;
        &lt;!&ndash;&lt;!&ndash; /.col &ndash;&gt;&ndash;&gt;

        &lt;!&ndash;&lt;!&ndash; fix for small devices only &ndash;&gt;&ndash;&gt;
        &lt;!&ndash;<div class="clearfix visible-sm-block"></div>&ndash;&gt;

        &lt;!&ndash;<div class="col-md-3 col-sm-6 col-xs-12" id="list-todoMsg" onclick="jumpCmsContent('ec63e8b647774351af16e7676f848c18','待阅消息', '/msg/toNotReadList');">&ndash;&gt;
            &lt;!&ndash;<div class="info-box">&ndash;&gt;
                &lt;!&ndash;<span class="info-box-icon" style="background-color: #e7f1f7;"><i class="fa fa-bell-o" style="color: #3c8dbc"></i></span>&ndash;&gt;

                &lt;!&ndash;<div class="info-box-content">&ndash;&gt;
                    &lt;!&ndash;<span class="info-box-text">消息通知</span>&ndash;&gt;
                    &lt;!&ndash;<span class="info-box-number" id="toRead-msgCount" >760</span>&ndash;&gt;
                &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;&lt;!&ndash; /.info-box-content &ndash;&gt;&ndash;&gt;
            &lt;!&ndash;</div>&ndash;&gt;
            &lt;!&ndash;&lt;!&ndash; /.info-box &ndash;&gt;&ndash;&gt;
        &lt;!&ndash;</div>&ndash;&gt;
        &lt;!&ndash;&lt;!&ndash; /.col &ndash;&gt;&ndash;&gt;
        &lt;!&ndash;<div class="col-md-3 col-sm-6 col-xs-12" id="list-linkMan" onclick="jumpCmsContent('5f96b9dd38b84fff8255ee2c61992c56','通讯录', '/sysDept/linkMan');">&ndash;&gt;
            &lt;!&ndash;<div class="info-box">&ndash;&gt;
                &lt;!&ndash;<span class="info-box-icon" style="background-color: #e7f1f7"><i class="fa fa-address-book-o" style="color: #3c8dbc"></i></span>&ndash;&gt;

                &lt;!&ndash;<div class="info-box-content">&ndash;&gt;
                    &lt;!&ndash;<span class="info-box-text">联系人</span>&ndash;&gt;
                    &lt;!&ndash;<span class="info-box-number" id="linkMan-userCount" >2,000</span>&ndash;&gt;
                &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;&lt;!&ndash; /.info-box-content &ndash;&gt;&ndash;&gt;
            &lt;!&ndash;</div>&ndash;&gt;
            &lt;!&ndash;&lt;!&ndash; /.info-box &ndash;&gt;&ndash;&gt;
        &lt;!&ndash;</div>&ndash;&gt;
        &lt;!&ndash;&lt;!&ndash; /.col &ndash;&gt;&ndash;&gt;
    &lt;!&ndash;</div>&ndash;&gt;


    &lt;!&ndash;<div class="row">&ndash;&gt;
        &lt;!&ndash;<div class="col-md-6">&ndash;&gt;
            &lt;!&ndash;<div class="box box-default box-solid" style="height: 293px;">&ndash;&gt;
                &lt;!&ndash;<div class="box-header with-border" style="background-color: #e7f1f7">&ndash;&gt;
                    &lt;!&ndash;<h3 class="box-title" style="color: #3c8dbc">厅内通知</h3>&ndash;&gt;
                    &lt;!&ndash;<div class="pull-right">&ndash;&gt;
                        &lt;!&ndash;<a href="#" onclick="jumpCmsContent('2bf10f6ad56b41b490af9a4037f1630a', '厅内通知', '/cmsContent/view/list/1');"><i class="fa fa-align-justify"></i></a>&ndash;&gt;
                    &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;&lt;!&ndash; /.box-header &ndash;&gt;&ndash;&gt;
                &lt;!&ndash;<div class="box-body">&ndash;&gt;
                    &lt;!&ndash;<ul class="nav nav-stacked" id="tntz">&ndash;&gt;
                    &lt;!&ndash;</ul>&ndash;&gt;
                &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;&lt;!&ndash; /.box-body &ndash;&gt;&ndash;&gt;
            &lt;!&ndash;</div>&ndash;&gt;
            &lt;!&ndash;&lt;!&ndash; /.box &ndash;&gt;&ndash;&gt;
        &lt;!&ndash;</div>&ndash;&gt;
        &lt;!&ndash;&lt;!&ndash; /.col &ndash;&gt;&ndash;&gt;
        &lt;!&ndash;<div class="col-md-6">&ndash;&gt;
            &lt;!&ndash;<div class="box box-default box-solid" style="height: 293px;">&ndash;&gt;
                &lt;!&ndash;<div class="box-header box-default with-border" style="background-color: #e7f1f7">&ndash;&gt;
                    &lt;!&ndash;<h3 class="box-title" style="color: #3c8dbc">今日要事</h3>&ndash;&gt;

                    &lt;!&ndash;<div class="pull-right">&ndash;&gt;
                        &lt;!&ndash;<a href="#" onclick="jumpCmsContent('2bf10f6ad56b41b490af9a4037f1630a', '今日要事', '/cmsContent/view/list/2');"><i class="fa fa-align-justify" ></i></a>&ndash;&gt;
                    &lt;!&ndash;</div>&ndash;&gt;
                    &lt;!&ndash;&lt;!&ndash; /.box-tools &ndash;&gt;&ndash;&gt;
                &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;&lt;!&ndash; /.box-header &ndash;&gt;&ndash;&gt;
                &lt;!&ndash;<div class="box-body">&ndash;&gt;
                    &lt;!&ndash;<ul class="nav nav-stacked" id="jrys">&ndash;&gt;
                    &lt;!&ndash;</ul>&ndash;&gt;
                &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;&lt;!&ndash; /.box-body &ndash;&gt;&ndash;&gt;
            &lt;!&ndash;</div>&ndash;&gt;
            &lt;!&ndash;&lt;!&ndash; /.box &ndash;&gt;&ndash;&gt;
        &lt;!&ndash;</div>&ndash;&gt;
        &lt;!&ndash;&lt;!&ndash; /.col &ndash;&gt;&ndash;&gt;

    &lt;!&ndash;</div>&ndash;&gt;
    &lt;!&ndash;<div class="row">&ndash;&gt;
        &lt;!&ndash;<div class="col-md-4">&ndash;&gt;
            &lt;!&ndash;<div class="box box-default box-solid" style="height: 293px;" >&ndash;&gt;
                &lt;!&ndash;<div class="box-header with-border" style="background-color: #e7f1f7">&ndash;&gt;
                    &lt;!&ndash;<h7 class="box-title" style="color: #3c8dbc">建设要闻</h7>&ndash;&gt;
                    &lt;!&ndash;<div class="pull-right">&ndash;&gt;
                        &lt;!&ndash;<a href="#" onclick="jumpCmsContent('2bf10f6ad56b41b490af9a4037f1630a', '建设要闻', '/cmsContent/view/list/4');"><i class="fa fa-align-justify"></i></a>&ndash;&gt;
                    &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;&lt;!&ndash; /.box-header &ndash;&gt;&ndash;&gt;
                &lt;!&ndash;<div class="box-body" style="">&ndash;&gt;
                    &lt;!&ndash;<ul class="nav nav-stacked" id="jsyw">&ndash;&gt;

                    &lt;!&ndash;</ul>&ndash;&gt;
                &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;&lt;!&ndash; /.box-body &ndash;&gt;&ndash;&gt;
            &lt;!&ndash;</div>&ndash;&gt;
            &lt;!&ndash;&lt;!&ndash; /.box &ndash;&gt;&ndash;&gt;
        &lt;!&ndash;</div>&ndash;&gt;
        &lt;!&ndash;<div class="col-md-4">&ndash;&gt;
            &lt;!&ndash;<div class="box box-default box-solid" style="height: 293px;">&ndash;&gt;
                &lt;!&ndash;<div class="box-header with-border" style="background-color: #e7f1f7">&ndash;&gt;
                    &lt;!&ndash;<h5 class="box-title" style="color: #3c8dbc">情况摘报</h5>&ndash;&gt;
                    &lt;!&ndash;<div class="pull-right">&ndash;&gt;
                        &lt;!&ndash;<a href="#" onclick="jumpCmsContent('2bf10f6ad56b41b490af9a4037f1630a', '情况摘报', '/cmsContent/view/list/3');"><i class="fa fa-align-justify"></i></a>&ndash;&gt;
                    &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;&lt;!&ndash; /.box-header &ndash;&gt;&ndash;&gt;
                &lt;!&ndash;<div class="box-body" style="">&ndash;&gt;
                    &lt;!&ndash;<ul class="nav nav-stacked" id="qkzb">&ndash;&gt;

                    &lt;!&ndash;</ul>&ndash;&gt;
                &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;&lt;!&ndash; /.box-body &ndash;&gt;&ndash;&gt;
            &lt;!&ndash;</div>&ndash;&gt;
            &lt;!&ndash;&lt;!&ndash; /.box &ndash;&gt;&ndash;&gt;
        &lt;!&ndash;</div>&ndash;&gt;
        &lt;!&ndash;<div class="col-md-4">&ndash;&gt;
            &lt;!&ndash;<div class="box box-default box-solid" style="height: 293px;">&ndash;&gt;
                &lt;!&ndash;<div class="box-header with-border" style="background-color: #e7f1f7">&ndash;&gt;
                    &lt;!&ndash;<h5 class="box-title" style="color: #3c8dbc">知识中心</h5>&ndash;&gt;
                    &lt;!&ndash;<div class="pull-right">&ndash;&gt;
                        &lt;!&ndash;<a href="#" onclick="jumpCmsContent('2bf10f6ad56b41b490af9a4037f1630a', '知识中心', '/cmsContent/view/list/8');"><i class="fa fa-align-justify"></i></a>&ndash;&gt;
                    &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;&lt;!&ndash; /.box-header &ndash;&gt;&ndash;&gt;
                &lt;!&ndash;<div class="box-body" style="">&ndash;&gt;
                    &lt;!&ndash;<ul class="nav nav-stacked" id="zszx">&ndash;&gt;

                    &lt;!&ndash;</ul>&ndash;&gt;
                &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;&lt;!&ndash; /.box-body &ndash;&gt;&ndash;&gt;
            &lt;!&ndash;</div>&ndash;&gt;
            &lt;!&ndash;&lt;!&ndash; /.box &ndash;&gt;&ndash;&gt;
        &lt;!&ndash;</div>&ndash;&gt;
    &lt;!&ndash;</div>&ndash;&gt;
</section>
<div th:replace="admin/include/footer :: foot"></div>
</body>
<script th:src="@{/resources/awi/plugins/chartjs/Chart.js}"></script>
<script type="text/javascript" language="javascript">


    $(function () {
		/**
		 * 初始化数量值
		 * @author lxf
         * @date 2019-01-25
		 */
		// initCount('/flowable/taskCountQuery','todo-taskCount');
		// initCount('/bumf2Base/bumfToDoCount','todo-bumfCount');
		// initCount('/msg/notReadCount','toRead-msgCount');+
		// initCount('/sysUser/count','linkMan-userCount');
		// // 加载内容列表
        // contentList('1','tntz');
        // contentList('2','jrys');
        // contentList('4','jsyw');
        // contentList('3','qkzb');
        // contentList('8','zszx');
    })

    var months = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"];
    var weekdays = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
    var currentTime;

    function showDate() {
        var date = new Date();

        var year = date.getFullYear(); //getYear();
        var month = undefined;
        var day = date.getDate();
        var weekday = undefined;
        for (var i = 0; i < months.length; i++) {
            if (date.getMonth() == i) {
                month = i + 1; //months[i];
            }
        }

        switch (date.getDay()) {
            case 0:
                weekday = weekdays[0];
                break;
            case 1:
                weekday = weekdays[2];
                break;
            case 2:
                weekday = weekdays[2];
                break;
            case 3:
                weekday = weekdays[3];
                break;
            case 4:
                weekday = weekdays[4];
                break;
            case 5:
                weekday = weekdays[5];
                break;
            case 6:
                weekday = weekdays[6];
                break;

        }

        document.getElementById("date").innerHTML = +year + "年" + month + "月" + day + "日  " + weekday + " ";
    }

    //显示时间
    function showTime() {
        var date = new Date();
        var hour = date.getHours();
        var mins = date.getMinutes();
        var sec = date.getSeconds();

        hour = checkTime(hour);
        mins = checkTime(mins);
        sec = checkTime(sec);

        var result = hour + ":" + mins + ":" + sec;
        currentTime = result;
        document.getElementById("time").innerHTML = result;
        //每隔一段时间就重复执行这个函数,实现和setInterval相同的功能
        //setTimeout(showTime,500);
        //setTimeout("showTime()",500);
    }

    //将小于10的数字前面添加个0
    function checkTime(time) {
        if (time < 10) {
            time = "0" + time;
        }
        return time;
    }

    //这个函数是按照间隔指定的时间来重复执行的
    // setInterval(showTime, 1000);
    /**
     * 文章列表
     * @param typeId 类别id
     * @param ulId  html id
     */
    function contentList(typeId, ulId) {
        $.post("/cmsContent/indexContent", {'category': typeId}, function (res) {
            if (res.code== 0) {
                var resp = res.data;
                for (var i in resp) {
                    var re = resp[i];
                    var title = re.title;
                    if (title.length > 20) {
                        title = title.substr(0, 20) + '...';
                    }
                    $("#" + ulId).append('<li><a href="/cmsContent/toView?msgDetailUrl=/cmsContent/get?id='+re.id+'" target="_self" class="a" style="font-size:14px;line-height:14px; font-family:宋体">' + title + '</a></li>')
                }
            }else{
                layer.msg('文章加载失败!')
            }
        })
    }
    /**
     * 设置数量值
     * @author lxf
     * @date 2019-01-25
     */
    function initCount(url, labelId){
    	$.post(url, function (res) {
            if (res.code== 0) {
            	$("#" + labelId).text(res.data);
            }else{
                layer.msg('数量加载失败!')
            }
        })
    }
    /**
     * 快速跳转 链接
     * 跳转到 信息发布&#45;&#45;内容列表，指定类别查询
     * @author lxf
     * @date 2019-01-25
     */
    function jumpCmsContent(_id, _title , _url){
    	// 先根据 菜单id查找该菜单tab标签
    	var $menuTab = parent.findTabPanel(_id) ;
    	// 如果该菜单的tab标签已经存在就删除
    	if (null != $menuTab ){parent.closeTabByPageId(_id)}
    	// 重新创建tab标签
    	parent.addTabs({id:_id,title: _title,close: true,url: _url,urlType: 'abosulte'});
    }
</script>
</html>-->
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>欢迎页</title>
    <link th:replace="admin/include/head :: head">
</head>
<body>



<div th:replace="admin/include/footer :: foot"></div>
<script th:src="@{/resources/awi/plugins/sockjs/sockjs.min.js}"></script>
<script th:src="@{/resources/awi/plugins/sockjs/stomp.min.js}"></script>
<script th:inline="javascript">

    var stompClient = null;

    //打开socket连接
    function openLink(){
        var socket = new SockJS("/webSocketServer");
        stompClient = Stomp.over(socket);
        //请求连接webSocket服务
        stompClient.connect({}, function(frame){
            //订阅点对点消息
            stompClient.subscribe("/point/channel/user", function(response){
                $("#inbox").append("<br/>点对点消息: " + response.body);
            });
            //订阅全局消息
            stompClient.subscribe("/channel/global", function(response){
                $("#inbox").append("<br/>全局消息: " + response.body);
            });
            //订阅分组消息
            subscribeGroup();
        });
    }
    //订阅分组消息
    function subscribeGroup(){
        stompClient.subscribe("/channel/group/groupA", function(response){
            $("#inbox").append("<br/>分组消息: " + response.body);
        });
        stompClient.subscribe("/channel/group/groupB", function(response){
            $("#inbox").append("<br/>分组消息: " + response.body);
        });
    }

    //关闭socket连接
    function closeLink(){
        if(stompClient != null){
            stompClient.disconnect();
        }
    }

    //发送全局消息
    function global(){
        var message = $("#message").val();
        stompClient.send("/message/global", {}, message);
    }

    //发送分组消息
    function group(){
        var groupId = $("#groupId").val();
        var message = $("#message").val();
        stompClient.send("/message/group/" + groupId, {}, message);
    }

    //发送点对点消息
    function user(){
        var userId = $("#userId").val();
        var message = $("#message").val();
        stompClient.send("/message/user/" + userId, {}, message);
    }

    //临时订阅, 获取一次性资源
    function temporary(){
        stompClient.subscribe("/message/temporary", function(response){
            $("#inbox").append("<br/>GET: " + response.body);
        }, {"message": "temporary"});
    }

</script>
</body>
</html>